package com.课上案例练习.可变参数类型_不定个数的参数;

import java.util.ArrayList;

public class Test1 {
    public static void main(String[] args) {
            int []p={1,2,3,4,5};
            test(p);
        ArrayList<Object> objects = new ArrayList<>();
    }
    public   static void test(int... a){
        System.out.println("可变数组");
        for (int i1 = 0; i1 < a.length; i1++) {
            System.out.println(a[i1]);
        }
    }
}
